package com.mzz.structure.proxy.proxyaop;

import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;

/**
 * @author xushijian
 * @date 18/6/5 上午10:01
 */
public abstract class BeforeHandler extends AbstractHandler {

    /**
     * 处理前
     *
     * @param proxy  代理
     * @param method 方法
     * @param args   参数
     */
    public abstract void handlBefore(Object proxy, Method method, Object[] args);

    public Object invoke(Object proxy, Method method, Object[] args) throws InvocationTargetException, IllegalAccessException {
        handlBefore(proxy, method, args);
        // method.invoke(getTargetObject(), args);
        return null;
    }
}
